package com.pocketsweet.model;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVFile;
import com.avos.avoscloud.AVObject;
import com.avos.avoscloud.AVRelation;
import com.pocketsweet.C;
import com.pocketsweet.service.UserService;

@AVClassName("MLAuthentication")
public class MLAuthentication extends AVObject {
	public static final String AVATAR = "avatar";
	public static final String NEEDRECOMMEND = "needRecommend";
	public static final String SPONSOR = "sponsor";
	public static final String STATUS = "status";
	public static final String CONTACT = "contact";
	public static final String STORY = "story";

	public MLAuthentication() {
		setSponsor(UserService.getCurrentUser());
		setStatus(C.IDENTIFICATION_STATUS_WAITING);
	}

	// //////////////////////////////////////////
	// 外键反馈人
	// //////////////////////////////////////////
	public MLUser getSponsor() {
		return (MLUser) super.getAVUser(SPONSOR);
	}

	public void setSponsor(MLUser user) {
		super.put(SPONSOR, user);
	}

	// 头像
	public AVFile getAvatar() {
		return super.getAVFile(AVATAR);
	}

	public void setAvatar(AVFile value) {
		super.put(AVATAR, value);
	}

	public String getNeedRecommend() {
		return super.getString(NEEDRECOMMEND);
	}

	public void setNeedRecommend(int value) {
		super.put(NEEDRECOMMEND, value);
	}

	public int getStatus() {
		return super.getInt(STATUS);
	}

	public void setStatus(int value) {
		super.put(STATUS, value);
	}

	public String getContact() {
		return super.getString(CONTACT);
	}

	public void setContact(String value) {
		super.put(CONTACT, value);
	}
	public String getStory() {
		return super.getString(STORY);
	}
	
	public void setStory(String value) {
		super.put(STORY, value);
	}

}
